# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cegui06
pkgver=0.6.2b
pkgrel=15
pkgdesc="CEGUI library 0.6 for apps which need this specific version"
url="http://www.cegui.org.uk"
arch="all"
license="MIT LGPL-2.0-or-later"
depends=""
makedepends="freetype-dev pcre-dev expat-dev libice-dev libsm-dev glew-dev
	mesa-dev glu-dev lua-dev"
install=""
subpackages="$pkgname-dev"
source="https://downloads.sourceforge.net/crayzedsgui/CEGUI-$pkgver.tar.gz
	cegui-0.6.2-gcc46.patch
	cegui-0.6.0-release-as-so-ver.patch
	cegui-0.6.0-userverso.patch
	cegui-gcc8.patch
	"

builddir="$srcdir"/CEGUI-0.6.2
prepare() {
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-samples \
		--with-pic \
		--with-default-xml-parser=ExpatParser
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="52ed7e7a97024138af957815a396dda74b650e7c53542d2d48c5eb95335bec270abca3685c49b05078f4338079334df6bfbcec75e9b7eb21ee40bdbff5f57b20  CEGUI-0.6.2b.tar.gz
83aa24c69e282473fb1dbf250bd4c80ed03f484633cf5fc26a87ae1c133b9938e3c1626b1d6f1a65e95275998b17307a1c94b36b291f4d8dd9c04ca15b67f8d9  cegui-0.6.2-gcc46.patch
c5899a7fc18339c8d03c27f96e246192c616328bb3b20a88a6bdef30d0efd840608afe6fb96b256712e950c2095784c03e71a1a96d8cd13e93a0da402c9de6c6  cegui-0.6.0-release-as-so-ver.patch
6d560f6550c83186c434e1e572f25d45ec1ef0f02ed8066331d35116a775c71f28122ef0d64a77cfdb4de4d2e3929716c36616d2e1ec7d68ac09b5c07053b95e  cegui-0.6.0-userverso.patch
b34301311d198034369e0f093b40da7d0e7a9bf46e088a47d5dbffa594004a6541b84d41c16ea7ca43e97407c684f9275f7218b046663b90ab658d374dbf5e30  cegui-gcc8.patch"
